export const mealTypes = [
  { name: '早餐', value: 'breakfast' },
  { name: '午餐', value: 'lunch' },
  { name: '晚餐', value: 'dinner' }
]

export function typeFil(type) {
  const types = {
    breakfast: '早餐',
    lunch: '午餐',
    dinner: '晚餐'
  }
  if (['breakfast', 'lunch', 'dinner'].includes(type)) {
    return types[type]
  } else {
    return type
  }
}

export function markFil(type) {
  const types = {
    breakfast: '早',
    lunch: '午',
    dinner: '晚'
  }
  if (['breakfast', 'lunch', 'dinner'].includes(type)) {
    return types[type]
  } else {
    return type
  }
}

export function custStatusFil(type) {
  const types = {
    disable: '冻结',
    enable: '正常'
  }
  return types[type]
}

export function custStatusColorFil(type) {
  const types = {
    disable: 'danger',
    enable: 'success'
  }
  return types[type]
}

export function filterCate(item,i,tagList,str='/'){
     return  item+(item&&i>=0&&i<tagList.length-1?'/':'')
    }
export function fileFormat(item){
        let fstr =''
         if(item.indexOf('.')>-1){
           fstr = item.split('.')[item.split('.').length-1]
         }
     return fstr
    }
